package com.qqcy.authservice.util;

public class XTCSResult {
    //响应业务状态
    private Integer status;
    //响应消息
    private String msg;
    //响应的数据
    private Object data;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public XTCSResult(Integer status, String msg, Object data) {
        super();
        this.status = status;
        this.msg = msg;
        this.data = data;
    }

    public XTCSResult(Object data) {
        super();
        this.status = 200;
        this.msg = "ok";
        this.data = data;
    }

    public static XTCSResult build(Integer status, String msg, Object data) {
        return new XTCSResult(status, msg, data);
    }

    public static XTCSResult build(Integer status, String msg) {
        return new XTCSResult(status, msg, null);
    }

    public static XTCSResult ok(Object data) {
        return new XTCSResult(data);
    }

    public static XTCSResult ok() {
        return new XTCSResult(null);
    }

    public XTCSResult() {
        super();
        // TODO Auto-generated constructor stub
    }
}
